package cn.skyquant.quant4j.api.ea;

import cn.skyquant.quant4j.api.dto.ResultDTO;
import cn.skyquant.quant4j.api.enums.BorkerType;

public interface EAService {

    //获取EA状态
    @Deprecated
    ResultDTO<EAManagerDTO> getByKey(String ea, Integer eaId, String accountCode, BorkerType borkerType);
    //获取EA或创建EA
    ResultDTO<EAManagerDTO> getOrCreate(String ea, Integer eaId, Integer accountId);
    //准备启动EA
    ResultDTO<Void> ready(Integer id,String hostname,String localIp,String remoteIp);
    //启动EA
    ResultDTO<Void> start(Integer id);
    //停止EA
    ResultDTO<Void> stop(Integer id);
    //发送心跳
    ResultDTO<Void> heartbeat(Integer id,String borkerTime,String remoteIp);
}
